﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Deom
{
    class Studet
    {
        public int Id { get; set; }
        public char Sex { get; set; }
        public string Name { get; set; }

        public Studet(int id, string name, char sex)
        {
            this.Name = name;
            this.Sex = sex;
            this.Id = id;
        }

        public int Age;
        private int Year = 2020;

        public Studet(int age)
        {
            Age = Year - age;
        }
        public void Annual()
        {
            if (Age>=18)
            {
                Console.WriteLine("成年");
            }
            else
            {
                Console.WriteLine("小屁孩");
            }
        }

        ~Studet()
        {
            Console.WriteLine("你是{0}岁",Age);
        }

        public void Setup()
        {
            Console.WriteLine("我是 {0} ,我是一个{1}生 , 我的id是 {2}", Name, Sex, Id);
        }
    }
}
